import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import Home from './components/home';
import MedicineManagement from './components/medicine-management';
import CustomerManagement from './components/customer-management';
import SalesRecord from './components/sales-record';

// 创建简单的系统设置组件
const Settings = () => {
  return (
    <div style={{ padding: '24px' }}>
      <h1>系统设置</h1>
      <p>这里是系统设置页面</p>
    </div>
  );
}

function App() {
  return (
    <Router>
      <Routes>
        <Route path="/" element={<Home />} />
        // 修改:将/medicine改为/medicines以匹配routes.tsx中的定义
        <Route path="/medicines" element={<MedicineManagement />} />
        <Route path="/customer" element={<CustomerManagement />} />
        <Route path="/sales" element={<SalesRecord />} />
        {/* 添加系统设置路由 */}
        <Route path="/settings" element={<Settings />} />
      </Routes>
    </Router>
  );
}

export default App;
